  
<template>

    <el-breadcrumb separator="|" style="padding-bottom: 20px;">
      <el-breadcrumb-item>
          {{ currentPageTitle }}
      </el-breadcrumb-item>
    </el-breadcrumb>

  </template>
<script lang="ts" setup>
import user from '@/mock/user';
import { onMounted, ref, watch } from 'vue';
import { useRoute } from 'vue-router';

 const currentPageTitle = ref();
 const route = useRoute();
 
  onMounted(() => {
    currentPageTitle.value = route.meta.title
  });
   watch(() => route.path, (newPath) => {
    console.log('路径变化:', newPath);
    currentPageTitle.value = route.meta.title
  });

</script>